package com.project.controller;

import com.project.bean.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

/**
 * @author lyl
 * description:
 */
@RestController //无法跳转页面，只能输出数据  @controller+@ResponseBody
@RequestMapping("my")
public class MyController {

    @RequestMapping("getBean")
    public User getBean() {
        return new User(2, "张三", LocalDate.parse("1990-01-02"));
    }

}
